@extends('backstage.layout.master')
@section('title', '优惠劵列表')
@section('content')
    <style>
        .state li {
            list-style: none;
            float: left;
            padding: 0 20px;
            text-align: center;
            height: 40px;
            line-height: 40px;
        }

        .state ul {
            margin: 0;
        }

        .state a {
            font-size: 12px;
        }
        .che a {
            font-weight: bold;
            color: #7c7c7c;
        }
    </style>
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try {
                ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>

            <li class="active">
                <a href="/backstage/coupons/addcoupons">添加优惠劵</a>
            </li>
            <li>
                优惠劵列表
            </li>
        </ul><!-- .breadcrumb -->

    </div>

    <div class="page-content">
        <div class="page-header">
            <h1>
                优惠劵
                <small>
                    <i class="icon-double-angle-right"></i>
                    优惠劵列表
                </small>
            </h1>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <h1>
                    渠道编号: {{isset($_GET['channel_id']) ? $_GET['channel_id'] : ''}}<br>
                    已领取数: {{isset($result['send']) ? $result['send'] : ''}}<br>
                    已使用数: {{isset($result['use']) ? $result['use'] : ''}}
                </h1>
                <!-- PAGE CONTENT BEGINS -->
                <div class="table-responsive">
                    <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <!-- <th >编号</th> -->
                            <th>兑换码</th>
                            <th>使用时间</th>
                            <th>绑定用户</th>
                            <th>金额</th>
                            <th width="150px">操作区</th>
                        </tr>
                        </thead>

                        <tbody>
                        @if(isset($result['data']))
                        @foreach ($result['data'] as $coupon)
                        <tr class="">
                            <!-- <td>
                                {{isset($channel->id)?$channel->id:''}}
                            </td> -->
                            <td>
                                {{isset($coupon->coupon_id)?$coupon->coupon_id:''}}
                            </td>
                            <td>
                                {{isset($coupon->using_time) && $coupon->using_time != 0 ? date('Y-m-d H:i:s',$coupon->using_time) : '未使用'}}
                            </td>
                            <td>
                                {{isset($coupon->user_id) ? $coupon->user_id : ''}}
                            </td>
                            <td>
                                {{isset($coupon->price)?$coupon->price:''}}
                            </td>
                            <td class="center" style="padding-top: 15px">
                                <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">

                                </div>
                            </td>
                        </tr>
                        @endforeach
                        @endif
                        </tbody>
                    </table>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="dataTables_info" id="sample-table-2_info"></div>
                    </div>
                    <div class="col-sm-6">
                        <div class="dataTables_paginate paging_bootstrap">
                            @if(isset($result['data']))
                            <?php echo $result['data']->render(); ?>
                            @endif
                        </div>
                    </div>
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->
@stop
@section('script')
    <script type="text/javascript">

    </script>
@stop
